<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link rel="stylesheet" href="{{__PUBLIC__}}/Admin/css/page.css">
	    <script type="text/javascript" src="{{__PUBLIC__}}/jquery-1.7.2.min.js"></script>
		 <script type="text/javascript" src="{{__PUBLIC__}}/Admin/hdjs/hdjs.min.js"></script>
	    <link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Admin/hdjs/hdjs.css"/>
			
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
			  <th>商品ID</th>
			  {{foreach from="$taname" value="$v"}}
			  	<th>{{$v}}</th>
			  {{endforeach}}
			  <th>库存</th>
			  <th>货号</th>
			  <th width="210">操作</th>
			</tr>
			{{foreach from="$data" value="$v"}}
				<tr>
					<td>{{$v['glid']}}</td>
					{{foreach from="$v['gavalue']" value="$g"}}
						<td>{{$g}}</td>
					{{endforeach}}
					<td>{{$v['inventory']}}</td>
					<td>{{$v['art_no']}}</td>
					<td>
						<a href="{{U('edit',array('glid'=>$v['glid'],'gid'=>Q('get.gid')))}}" class="btn btn-sm btn-warning">编辑</a>
						<a href="javascript:;" class="btn btn-sm btn-danger" onclick="if(confirm('确定删除吗？')) location.href='{{U('del',array('glid'=>$v['glid']))}}' ">删除</a>
					</td>
				</tr>
			{{endforeach}}
			<form onsubmit="return hd_submit(this,'{{U('Goods_list/add')}}','{{U('Goods_list/index',array("gid"=>Q("get.gid")))}}')">
				<tr class="success">
						<td>添加货品</td>
					{{foreach from="$typeData" value="$td"}}
						<td>
							<select name="combine[]" id="">
									<option value="0">请选择</option>
								{{foreach from="$td" key="$k"  value="$value"}}
									<option value="{{$k}}">{{$value}}</option>
								{{endforeach}}
							</select>
						</td>
					{{endforeach}}
						<td><input type="text" name="inventory" placeholder="请输入库存量"></td>
						<td><input type="text" name="art_no" placeholder="请输入货号"></td>
						<td><input type="submit" class="btn btn-info" value="添加货品">&nbsp;&nbsp;<a href="{{U('Goods/index')}}" class="btn btn-success">返回</a><input type="hidden" name="goods_gid" value="{{Q('get.gid')}}"></td>
				</tr>
			</form>
		</table>
		<center>
			<div class="page">
				<ul>
					{{$page}}
				</ul>
			</div>
		</center>
	</body>
</html>
